package arina.university.dao.factory;

import arina.university.dao.GroupDAO;
import arina.university.dao.StudentDAO;
import arina.university.dao.UniversityDAO;
import arina.university.dao.factory.impl.MemoryDAOFactory;

/**
 * Created with IntelliJ IDEA.
 * User: user
 * Date: 01.12.13
 * Time: 19:13
 * To change this template use File | Settings | File Templates.
 */
public abstract class DAOFactory {
    public static final int MEMORY=1;

    public abstract StudentDAO getStudentDAO();
    public abstract GroupDAO getGroupDAO();
    public abstract UniversityDAO getUniversityDAO();

    public static DAOFactory getDAOFactory(
            int whichFactory) {

        switch (whichFactory) {
            case MEMORY:
                return new MemoryDAOFactory();

            default           :
                return null;
        }
    }
}



